Optimal. Leaf size=208 \[ \frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \cos ^2(e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (2-n p);\frac {1}{2} (4-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f (2-n p) \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {4033, 3905,
3872, 3857, 2722} \begin {gather*} -\frac {\sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \sin (e+f x) \cos ^2(e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (2-n p);\frac {1}{2} (4-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{a f (2-n p) \sqrt {\sin ^2(e+f x)}}+\frac {\sin (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{f (a \sec (e+f x)+a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3857
Rule 3872
Rule 3905
Rule 4033
Rubi steps
\begin {align*} \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p}}{a+a \sec (e+f x)} \, dx\\ &=\frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\left (d (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{-1+n p} (a-a \sec (e+f x)) \, dx}{a^2}\\ &=\frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx}{a}-\frac {\left (d (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{-1+n p} \, dx}{a}\\ &=\frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n p} \, dx}{a}-\frac {\left (d (1-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{1-n p} \, dx}{a}\\ &=\frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \cos ^2(e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (2-n p);\frac {1}{2} (4-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f (2-n p) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 1.08, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{a +a \sec \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________